All Questions
6 questions
9votes
4answers
4kviews
Building string with max length
I need to run a evaluation for large (1 Million) number of components and build a string with error which has comma separated error codes. As the final string is to be persisted in RDBMS TABLE.COLUMN ...
10votes
2answers
8kviews
Converting Morse Code
Challenge Write a program which reads a file containing Morse Code and outputs the conversion. Specifications The first argument is a path to a file. The file contains multiple lines. Each line ...
5votes
1answer
569views
Test whether target string is substring of source string
The code is self-explanatory. It has \$O(n)\$ complexity, and it tells whether a given string is the substring of the source string. Are there any cases where this algorithm fails? Is there anything ...
5votes
2answers
467views
Longest substring with unique characters
Find the length of the longest substring without repeating characters Any comments on my code? ...
12votes
4answers
13kviews
Align Strings for Output
I wrote a class which can format input so that it is properly aligned. I'm interested in all suggestions (regarding structure, usability, style, naming, comments, etc). I'm especially wondering ...
7votes
5answers
785views
Refactoring String manipulating method with TDD
I'd like to refactor my extractSimplePromptName test so it does the same but it's "prettier", hence less code. As far as looking at it, it seems like it could be ...